package com.application.fabric.fabriccontrol.operate.serverfabric;


import com.application.fabric.fabriccontrol.operate.entityfabric.BasicAsset;
import com.application.fabric.fabriccontrol.operate.mapper.Assistmapper;
import com.application.fabric.fabriccontrol.operate.serverfabric.impl.IMysqlFabricServer;
import com.application.fabric.users.entity.Usermessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MysqlFabricServer implements IMysqlFabricServer {

    @Autowired
    private Assistmapper assistmapper;
    @Override
    public int StorageServer(BasicAsset basicAsset) {
        return assistmapper.Storage(basicAsset);
    }

    @Override
    public List<BasicAsset> queryassets() {
        return assistmapper.QueryAssets();
    }

//    通过id去查询特定资产
    @Override
    public List<BasicAsset> queryassetbyid(String assetid){
        return assistmapper.Queryassetbyid(assetid);
    }

    @Override
    public List<BasicAsset> queryassetbyidservice(String owner) {
        return assistmapper.Queryassetbyowner(owner);
    }

}
